package com.zhuanzhuan.hero.user.enums;

import lombok.Getter;

import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName ClientSourceEnum
 * @Description
 * @Author hanjunjun
 * @Date 2024/6/24 11:22
 */
@Getter
public enum ClientSourceEnum {

    ANDROID("231", "安卓"),
    IOS("232", "IOS"),
    WECHAT_MINI("233", "微信小程序"),
    ;

    private final String tValue;

    private final String name;

    ClientSourceEnum(String tValue, String name) {
        this.tValue = tValue;
        this.name = name;
    }

    /**
     * 端外  t值
     */
    private static final Set<String> OUTER_CLIENT_TVALUE_SET = new HashSet<>();

    static {
        OUTER_CLIENT_TVALUE_SET.add(ClientSourceEnum.WECHAT_MINI.tValue);
    }

    public static boolean isOuterClient(String clientT) {
        return OUTER_CLIENT_TVALUE_SET.contains(clientT);
    }
}
